<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set value="${pageContext.request.contextPath}" var="ctx" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<link href="${ctx}/css/skin.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/css/chosen.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="${ctx}/css/zTreeStyle.css" type="text/css">
<link href="${ctx}/css/page.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx}/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/js/backOffice.js"></script>
<script type="text/javascript"
	src="${ctx}/js/jquery.ztree.core-3.5.min.js"></script>
<script type="text/javascript" src="${ctx}/js/jquery.myPagination.js"></script>
<script type="text/javascript" src="${ctx}/js/chosen.jquery.min.js"></script>
<script type="text/javascript">
	var curDes, curHead, curName;
	var orgId = '';
	var setting = {
		view : {
			dblClickExpand : false,
			showLine : true,
			selectedMulti : false
		},
		data : {
			simpleData : {
				enable : true,
				idKey : "id",
				pIdKey : "parentOrgId",
				rootPId : ""
			},
			key : {
				name : 'orgName'
			}
		},
		callback : {
			beforeClick : function(treeId, treeNode) {
				var zTree = $.fn.zTree.getZTreeObj("tree");
				if (treeNode.isParent) {
					zTree.expandNode(treeNode);
					return true;
				}
			},
			onClick : function(event, treeId, treeNode, clickFlag) {
				var zTree = $.fn.zTree.getZTreeObj("tree");
				orgId = zTree.getSelectedNodes()[0].id;
				getOrgById(orgId);
			}
		}
	};

	function init() {
		var obj = {};
		obj.type = 'all';
		$.ajax({
			url : '${ctx}/org/post',
			type : 'post',
			data : obj,
			dataType : 'json',
			success : function(data) {
				var t = $("#tree");
				t = $.fn.zTree.init(t, setting, data.data);
			}
		});
	}

	$(document).ready(function() {
		init();
	});

	function getOrgById(orgId) {
		var obj = {};
		obj.type = 'get';
		obj.orgId = orgId;
		$.ajax({
			url : '${ctx}/org/post',
			type : 'post',
			data : obj,
			dataType : 'json',
			success : function(data) {
				if (data.code == '200') {
					$('#orgHead').text('');
					$('#orgDesc').text(data.data.description);
					$("#orgName").text(data.data.orgName);
					if (data.user !== undefined) {
						$('#orgHead').text(data.user.trueName);
					}
					page(1);
				}
			}
		});
	}

	function page(pageIndex) {
		$("#demo1").myPagination({
			currPage : pageIndex,
			ajax : {
				on : true,
				dataType : 'json',
				url : '${ctx}/org/post',
				callback : 'showData',
				param : {
					on : true,
					type : 'getOrdStaff',
					orgId : orgId
				}
			}
		});
	}

	function addUser() {
		$("#addUserName").val("");
		$("#addEmail").val("");
		$("#addUserRemark").val("")
		var obj = {};
		obj.type = 'all';
		$
				.ajax({
					type : 'post',
					dataType : 'json',
					data : obj,
					url : '${ctx}/org/post',
					success : function(data) {
						if (data.code == 200) {
							var orgs = data.data;
							var str = '';
							for ( var i = 0; i < orgs.length; i++) {
								if ($.trim($("#orgName").html()) == orgs[i].orgName) {
									str += '<option value="'+orgs[i].id+'" selected="selected">'
											+ orgs[i].orgName + '</option>';
								} else {
									str += '<option value="'+orgs[i].id+'">'
											+ orgs[i].orgName + '</option>';
								}
							}
							$("#addUserOrg").html(str);
							$("#addUserOrg").chosen();
						}
					}
				});
		$("#btnSave").hide();
		$("#btnAdd").show();
		$("#divAddUser").show();
		$("#addUserName").focus();
	}

	function addUserSubmit() {
		var userName = $.trim($("#addUserName").val());
		var orgId = $.trim($("#addUserOrg").select().val());
		var userEmail = $.trim($("#addEmail").val());
		var remark = $.trim($("#addUserRemark").val());
		if (userName == "") {
			$("#addUserName").focus();
			return false;
		}
		if (orgId < 0) {
			$("#addUserOrg").focus();
			return false;
		}
		if (userEmail == "") {
			$("#addEmail").focus();
			return false;
		}
		var obj = {};
		obj.type = "add";
		obj.email = userEmail;
		obj.trueName = userName;
		obj.remark = remark;
		obj.orgId = orgId;

		$.ajax({
			type : 'post',
			dataType : 'json',
			data : obj,
			url : '${ctx}/user/post',
			success : function(data) {
				$("#divAddUser").hide();
				if (data.code == 200) {
					page(1);
				} else {
					$.msgbox.show({
						message : data.msg,
						icon : 'no'
					});
				}

			}
		});
	}

	function delUser(userId) {
		if (confirm("确定删除该用户吗？")) {
			var obj = {};
			obj.type = "delete";
			obj.userId = userId;
			$.ajax({
				type : 'post',
				dataType : 'json',
				data : obj,
				url : '${ctx}/user/post',
				success : function(data) {
					if (data.code == 200) {
						page(1);
					} else {
						$.msgbox.show({
							message : data.msg,
							icon : 'no'
						});
					}
				}
			});
		}
	}

	function moveUser(userId) {
		var obj = {};
		obj.type = 'all';
		$
				.ajax({
					type : 'post',
					dataType : 'json',
					data : obj,
					url : '${ctx}/org/post',
					success : function(data) {
						if (data.code == 200) {
							var orgs = data.data;
							var str = '';
							for ( var i = 0; i < orgs.length; i++) {
								if ($.trim($("#orgName").html()) == orgs[i].orgName) {
									str += '<option value="'+orgs[i].id+'" selected="selected">'
											+ orgs[i].orgName + '</option>';
								} else {
									str += '<option value="'+orgs[i].id+'">'
											+ orgs[i].orgName + '</option>';
								}
							}
							$("#moveUserOrg").html(str);
							$("#moveUserOrg").chosen();
						}
					}
				});
		$("#hidMvUserId").val(userId);
		$("#divMoveUser").show();
	}

	function moveUserSubmit() {
		var userId = $.trim($("#hidMvUserId").val());
		var orgId = $.trim($("#moveUserOrg").select().val());
		var obj = {};
		obj.type = 'copyto';
		obj.userId = userId;
		obj.orgId = orgId;
		$.ajax({
			type : 'post',
			dataType : 'json',
			data : obj,
			url : '${ctx}/user/post',
			success : function(data) {
				$("#hidMvUserId").val(userId);
				$("#divMoveUser").show();
				if (data.code == 200) {
					$.msgbox.show({
						message : data.msg,
						icon : 'ok'
					});
				} else {
					$.msgbox.show({
						message : data.msg,
						icon : 'no'
					});
				}
				$("#hidMvUserId").val("");
				$("#divMoveUser").hide();
			}
		});
	}

	function removeOut(userId) {
		if (confirm("确定移出？")) {
			var obj = {};
			obj.type = 'removeout';
			obj.userId = userId;
			obj.orgId = orgId;
			$.ajax({
				type : 'post',
				dataType : 'json',
				data : obj,
				url : '${ctx}/user/post',
				success : function(data) {
					if (data.code == 200) {
						$.msgbox.show({
							message : data.msg,
							icon : 'ok'
						});
						page(1);
					} else {
						$.msgbox.show({
							message : data.msg,
							icon : 'no'
						});
					}
				}
			});
		}
	}

	function editOrg() {
		curDes = $.trim($("#orgDesc").html());
		curHead = $.trim($("#orgHead").html());
		curName = $.trim($("#orgName").html());
		$("#editOrgDes").val(curDes);
		$("#editOrgName").val(curName);
		var obj = {};
		obj.type = "getall";
		$
				.ajax({
					type : 'post',
					dataType : 'json',
					data : obj,
					url : '${ctx}/user/post',
					success : function(data) {
						if (data.code == "200") {
							var rows = data.data;
							var str = '';
							for ( var i = 0; i < rows.length; i++) {
								if (curHead == rows[i].trueName) {
									str += '<option value="'+rows[i].id+'" selected="selected">'
											+ rows[i].trueName + '</option>';
								} else {
									str += '<option value="'+rows[i].id+'">'
											+ rows[i].trueName + '</option>';
								}
							}
							$("#editOrgHead").html(str);
							$("#editOrgHead").chosen();
						} else {
							$.msgbox.show({
								message : data.msg,
								icon : 'no'
							});
						}

					}
				});
		$("#divEditOrg").show();
	}

	function saveEditOrg() {
		var orgDes = $.trim($("#editOrgDes").val());
		var orgHead = $.trim($("#editOrgHead").select().val());
		var orgName = $.trim($("#editOrgName").val());
		var obj = {};
		obj.type = "modify";
		obj.orgId = orgId;
		obj.orgDes = orgDes;
		obj.orgHead = orgHead;
		obj.orgName = orgName;
		$.ajax({
			type : 'post',
			dataType : 'json',
			data : obj,
			url : '${ctx}/org/post',
			success : function(data) {
				$("#divEditOrg").hide();
				if (data.status == 200) {
					$.msgbox.show({
						message : data.data,
						icon : 'ok'
					});
					var treeObj = $.fn.zTree.getZTreeObj("tree");
					var node = treeObj.getSelectedNodes()[0];
					node.orgName = orgName;
					treeObj.updateNode(node);
				} else {
					$.msgbox.show({
						message : data.data,
						icon : 'no'
					});
				}
			}
		});
	}

	function cancelEditOrg() {
		$("#divEditOrg").hide();
		$("#editOrgDes").val(curDes)
		$("#editOrgHead").val(curHead);
	}

	function showData(data) {
		var rows = data.data.rows;
		var str = '';
		for ( var i = 0; i < rows.length; i++) {
			str += '<tr>';
			str += '<td height="30" class="left_txt2">'
					+ ((currPage - 1) * 8 + (i + 1)) + '</td>';
			str += '<td height="30" class="left_txt2">' + rows[i].trueName
					+ '</td>';
			str += '<td height="30" class="left_txt2">' + rows[i].email
					+ '</td>';
			str += '<td height="30" class="left_txt2">' + rows[i].remark
					+ '</td>';
			str += '<td height="30" class="left_txt2"><a href="javascript:delUser('
					+ rows[i].id
					+ ');">删除</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="editUser('
					+ rows[i].id
					+ ')">编辑</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="moveUser('
					+ rows[i].id
					+ ')">复制到其他部门</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="removeOut('
					+ rows[i].id + ')">移出部门</a></td>';
			str += '</tr>';
		}
		$('#staffs').html('').html(str);
	}

	function addOrg() {
		var obj = {};
		obj.type = 'all';
		$
				.ajax({
					type : 'post',
					dataType : 'json',
					data : obj,
					url : '${ctx}/org/post',
					success : function(data) {
						if (data.code == 200) {
							var rows = data.data;
							var str = '';
							for ( var i = 0; i < rows.length; i++) {
								if ($("#orgName").html() == rows[i].orgName) {
									str += '<option value="'+rows[i].id+'" selected="selected">'
											+ rows[i].orgName + '</option>';
								} else {
									str += '<option value="'+rows[i].id+'">'
											+ rows[i].orgName + '</option>';
								}
							}
							$("#addOrgParentOrg").html(str);
							$("#addOrgParentOrg").chosen();
						} else {
							$.msgbox.show({
								message : data.msg,
								icon : 'no'
							});
						}
					}
				});
		obj = {};
		obj.type = 'getall';
		$.ajax({
			type : 'post',
			dataType : 'json',
			data : obj,
			url : '${ctx}/user/post',
			success : function(data) {
				if (data.code == 200) {
					var rows = data.data;
					var str = '';
					for ( var i = 0; i < rows.length; i++) {
						str += '<option value="'+rows[i].id+'">'
								+ rows[i].trueName + '</option>';
					}
					$("#addOrgHead").html(str);
					$("#addOrgHead").chosen();
				} else {
					$.msgbox.show({
						message : data.msg,
						icon : 'no'
					});
				}
			}
		});

		$("#addOrgName").val("");
		$("#addOrgDes").val("");
		$("#addOrgParentOrg").focus();

		$("#divAddOrg").show();
	}

	function addOrgSubmit() {
		var parentOrgId = $("#addOrgParentOrg").select().val();
		var orgName = $("#addOrgName").val();
		var orgHeadId = $("#addOrgHead").select().val();
		var orgRemark = $("#addOrgDes").val();
		var obj = {};
		obj.type = 'add';
		obj.parentOrg = parentOrgId;
		obj.orgName = orgName;
		obj.orgHeadId = orgHeadId;
		obj.description = orgRemark;
		$.ajax({
			type : 'post',
			dataType : 'json',
			data : obj,
			url : '${ctx}/org/post',
			success : function(data) {
				$("#divAddOrg").hide();
				if (data.code == 200) {
					$.msgbox.show({
						message : data.msg,
						icon : 'ok'
					});
					var treeObj = $.fn.zTree.getZTreeObj("tree");
					var node = treeObj.getSelectedNodes()[0];
					treeObj.addNodes(node, data.entity, true);
					treeObj.reAsyncChildNodes(node, 'refresh');
				} else {
					$.msgbox.show({
						message : data.msg,
						icon : 'no'
					});
				}
			}
		});
	}

	function deleteOrg() {
		if (confirm("是否确认删除" + $("#orgName").html()
				+ "部门？删除后，该部门下面的人员自动列入上级部门。")) {
			var obj = {};
			obj.type = 'delete';
			obj.orgId = orgId;
			$.ajax({
				type : 'post',
				dataType : 'json',
				data : obj,
				url : '${ctx}/org/post',
				success : function(data) {
					if (data.code == 200) {
						$.msgbox.show({
							message : data.msg,
							icon : 'ok'
						});
						var treeObj = $.fn.zTree.getZTreeObj("tree");
						var node = treeObj.getSelectedNodes()[0];
						treeObj.removeNode(node);
						treeObj.reAsyncChildNodes(node, 'refresh');
					} else {
						$.msgbox.show({
							message : data.msg,
							icon : 'no'
						});
					}
				}
			});
		}
	}

	function resetPwd() {
		var uid = $("#hidUserId").val();
		var obj = {};
		obj.type = 'resetpwd';
		obj.userId = uid;
		$.ajax({
			type : 'post',
			dataType : 'json',
			data : obj,
			url : '${ctx}/user/post',
			success : function(data) {
				$("#divAddUser").hide();
				$("#btnResetPwd").hide();
				if (data.code == 200) {
					$.msgbox.show({
						message : data.msg,
						icon : 'ok'
					});
				} else {
					$.msgbox.show({
						message : data.msg,
						icon : 'no'
					});
				}
			}
		});
	}

	function editUser(userId) {
		var obj = {};
		obj.type = 'get';
		obj.userId = userId;
		$
				.ajax({
					type : 'post',
					dataType : 'json',
					data : obj,
					url : '${ctx}/user/post',
					success : function(data) {
						if (data.code == 200) {
							$("#addUserName").val(data.data.trueName);
							$("#addEmail").val(data.data.email);
							$("#addUserRemark").val(data.data.remark);
							$("#hidUserId").val(userId);
							$("#btnResetPwd").show();

							var obj = {};
							obj.type = 'all';
							$
									.ajax({
										type : 'post',
										dataType : 'json',
										data : obj,
										url : '${ctx}/org/post',
										success : function(data) {
											if (data.code == 200) {
												var orgs = data.data;
												var str = '';
												for ( var i = 0; i < orgs.length; i++) {
													if ($.trim($("#orgName")
															.html()) == orgs[i].orgName) {
														str += '<option value="'+orgs[i].id+'" selected="selected">'
																+ orgs[i].orgName
																+ '</option>';
													} else {
														str += '<option value="'+orgs[i].id+'">'
																+ orgs[i].orgName
																+ '</option>';
													}
												}
												$("#addUserOrg").html(str);
												$("#addUserOrg").chosen();
											}
										}
									});
						}
					}
				});
		$("#btnAdd").hide();
		$("#btnSave").show();
		$("#divAddUser").show();
		$("#addUserName").focus();
	}

	function editUserSubmit() {
		var userId = $.trim($("#hidUserId").val());
		var trueName = $.trim($("#addUserName").val());
		var email = $.trim($("#addEmail").val());
		var remark = $.trim($("#addUserRemark").val());
		var belongOrgId = $.trim($("#addUserOrg").select().val());
		if (trueName == "") {
			$("#addUserName").focus();
			return false;
		}
		if (belongOrgId < 0) {
			$("#addUserOrg").focus();
			return false;
		}
		if (email == "") {
			$("#addEmail").focus();
			return false;
		}
		var obj = {};
		obj.type = 'modifyuser';
		obj.userId = userId;
		obj.trueName = trueName;
		obj.email = email;
		obj.remark = remark;
		obj.belongOrgId = belongOrgId;
		$.ajax({
			type : 'post',
			dataType : 'json',
			data : obj,
			url : '${ctx}/user/post',
			success : function(data) {
				$("#divAddUser").hide();
				if (data.code == 200) {
					$.msgbox.show({
						message : data.msg,
						icon : 'ok'
					});
				} else {
					$.msgbox.show({
						message : data.msg,
						icon : 'no'
					});
				}
			}
		});
	}
</script>
</head>
<body>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="17" height="29" valign="top"
				background="${ctx}/images/mail_leftbg.gif"><img
				src="${ctx}/images/left-top-right.gif" width="17" height="29" /></td>
			<td width="" height="29" valign="top"
				background="${ctx}/images/content-bg.gif"><table width="100%"
					height="31" border="0" cellpadding="0" cellspacing="0"
					class="left_topbg" id="table2">
					<tr>
						<td height="31"><div class="titlebt">组织架构</div></td>
					</tr>
				</table></td>
			<td width="16" valign="top"
				background="${ctx}/images/mail_rightbg.gif"><img
				src="${ctx}/images/nav-right-bg.gif" width="16" height="29" /></td>
		</tr>
		<tr>
			<td height="71" valign="middle"
				background="${ctx}/images/mail_leftbg.gif">&nbsp;</td>
			<td valign="top" bgcolor="#F7F8F9"><table width="100%"
					height="138" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td height="13" valign="top">&nbsp;</td>
					</tr>
					<tr>
						<td valign="top"><table width="98%" border="0" align="center"
								cellpadding="0" cellspacing="0">
								<tr>
									<td class="left_txt">当前位置：组织架构</td>
								</tr>
								<tr>
									<td height="20"><table width="100%" height="1" border="0"
											cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
											<tr>
												<td></td>
											</tr>
										</table></td>
								</tr>
								<tr>
									<td width="100%" valign="top"
										style="min-height: 350px; height: 350px;">
										<table class="tblOrg" cellspacing="0" cellpadding="0">
											<tr>
												<td width="20%" valign="top">
													<ul id="tree" class="ztree"
														style="width: 260px; overflow: auto;"></ul>
												</td>
												<td valign="top">
													<table width="100%" border="0" cellspacing="0"
														cellpadding="0">
														<tr>
															<td height="30" class="tdTools" colspan="5"><a
																href="javascript:addOrg();">新增部门</a><a
																href="javascript:editOrg();">编辑部门信息</a> <a
																href="javascript:addUser();">新增部门人员</a> <a
																href="javascript:deleteOrg();">删除部门</a></td>
														</tr>
														<tr>
															<td height="30" class="nowtable left_bt2" colspan="5">&nbsp;&nbsp;&nbsp;&nbsp;组织信息
															</td>
														</tr>
														<tr>
															<td colspan="5">
																<table width="100%" cellpadding="0" cellspacing="0">
																	<tr>
																		<td height="30" class="left_txt2">组织名称:</td>
																		<td height="30" class="left_txt" id="orgName"></td>
																		<td height="30" class="left_txt2">组织负责人:</td>
																		<td height="30" class="left_txt" id="orgHead"
																			colspan="2">
																	</tr>
																	<tr>
																		<td height="30" class="left_txt2">组织说明:</td>
																		<td height="30" class="left_txt" id="orgDesc"
																			colspan="4"></td>
																		</td>
																	</tr>
																</table>
															</td>
														</tr>
														<tr>
															<td height="30" class="nowtable left_bt2" colspan="5">&nbsp;&nbsp;&nbsp;&nbsp;组织成员</td>
														</tr>
														<tr>
															<td height="30" width="10%" class="left_txt2">序号</td>
															<td height="30" width="15%" class="left_txt2">姓名</td>
															<td height="30" width="30%" class="left_txt2">公司邮箱</td>
															<td height="30" width="15%" class="left_txt2">备注</td>
															<td height="30" width="30%" class="left_txt2">操作</td>
														</tr>
														<tbody id="staffs">

														</tbody>
													</table>
													<div id="demo1"></div>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table></td>
					</tr>
				</table></td>
			<td background="${ctx}/images/mail_rightbg.gif">&nbsp;</td>
		</tr>
		<tr>
			<td valign="middle" background="${ctx}/images/mail_leftbg.gif"><img
				src="${ctx}/images/buttom_left2.gif" width="17" height="17" /></td>
			<td height="17" valign="top"
				background="${ctx}/images/buttom_bgs.gif"><img
				src="${ctx}/images/buttom_bgs.gif" width="17" height="17" /></td>
			<td background="${ctx}/images/mail_rightbg.gif"><img
				src="${ctx}/images/buttom_right2.gif" width="16" height="17" /></td>
		</tr>
	</table>

	<div id="divAddUser">
		<table>
			<tr>
				<td>姓名：</td>
				<td><input type="text" id="addUserName" value="" /></td>
			</tr>
			<tr>
				<td>邮箱：</td>
				<td><input type="text" id="addEmail" value="" /></td>
			</tr>
			<tr>
				<td>所属部门：</td>
				<td><select id="addUserOrg">

				</select></td>
			</tr>
			<tr>
				<td>备注</td>
				<td><textarea id="addUserRemark" rows="3" cols="30"></textarea></td>
			</tr>
			<tr>
				<td></td>
				<td><input id="btnAdd" type="button" value="添加"
					onclick="addUserSubmit()" /> <input id="btnSave" type="button"
					value="保存" onclick="editUserSubmit()" /> <input type="button"
					value="取消" onclick="javascript:$('#divAddUser').hide();" /> <input
					type="hidden" id="hidUserId" value="" /> <input type="button"
					value="密码重置" id="btnResetPwd" style="display: none;"
					onclick="resetPwd()" /></td>
			</tr>
		</table>
	</div>

	<div id="divMoveUser">
		<table>
			<tr>
				<td>目标部门：</td>
				<td><select id="moveUserOrg">

				</select></td>
			</tr>
			<tr>
				<td></td>
				<td><input id="btnMove" type="button" value="确定"
					onclick="moveUserSubmit()" /> <input type="button" value="取消"
					onclick="javascript:$('#divMoveUser').hide();" /> <input
					type="hidden" id="hidMvUserId" value="" /></td>
			</tr>
		</table>
	</div>

	<div id="divEditOrg">
		<table>
			<tr>
				<td>组织名称：</td>
				<td id="tdOrgName"><input type="text" id="editOrgName" value="" />
				</td>
			</tr>
			<tr>
				<td>组织负责人：</td>
				<td id="tdOrgHead"><select id="editOrgHead">

				</select></td>
			</tr>
			<tr>
				<td>组织说明：</td>
				<td id="tdOrgDes"><input type="text" id="editOrgDes" value="" />
				</td>
			</tr>
			<tr>
				<td></td>
				<td><input type="button" value="保存" onclick="saveEditOrg()"
					id="btnSaveOrg" /> <input type="button" value="取消"
					onclick="cancelEditOrg()" id="btnCancelEditOrg" /></td>
			</tr>
		</table>
	</div>

	<div id="divAddOrg">
		<table>
			<tr>
				<td>父组织：</td>
				<td><select id="addOrgParentOrg"></select></td>
			</tr>
			<tr>
				<td>组织名称：</td>
				<td id="tdOrgName"><input type="text" id="addOrgName" value="" />
				</td>
			</tr>
			<tr>
				<td>组织负责人：</td>
				<td id="tdOrgHead"><select id="addOrgHead">

				</select></td>
			</tr>
			<tr>
				<td>组织说明：</td>
				<td id="tdOrgDes"><input type="text" id="addOrgDes" value="" />
				</td>
			</tr>
			<tr>
				<td></td>
				<td><input type="button" value="保存" onclick="addOrgSubmit()" />
					<input type="button" value="取消"
					onclick="javascript:$('#divAddOrg').hide();" /></td>
			</tr>
		</table>
	</div>
</body>
</html>